<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>使用flex实现三栏布局</title>
    <style>
        body {
            margin: 0;
        }

        .header,
        .footer {
            line-height: 60px;
            text-align: center;
            font-size: 24px;
            border-bottom: 1px solid #ccc;
        }

        .main {
            display: flex;
            border-bottom: 1px solid #ccc;
        }

        .middle {
            flex: 1;
            order: 2;
        }

        .left {
            flex: 0 1 200px;
            order: 1;
        }

        .right {
            flex: 0 1 200px;
            order: 3;
        }
    </style>
</head>

<body>
    <header class="header">header</header>
    <main class="main">
        <section class="middle">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Autem dolorem ducimus facilis
            sint voluptate? Consequuntur deserunt doloribus earum eveniet fugiat id laboriosam modi numquam, placeat
            provident qui quia rerum, sunt.</section>
        <section class="left">left text</section>
        <section class="right">right text</section>
    </main>
    <footer class="footer">footer text</footer>
</body>

</html>